Write a custom CUDA kernel to optimize `TanhLU`.

Formula: f(x) = alpha * tanh(lambda * x) + beta * x

Problem Analysis:
1. Memory Bound & Computationally Heavy: The operation is element-wise but involves the expensive `tanh` function.
2. Operator Chaining: A PyTorch implementation creates intermediate tensors for `tanh` and arithmetic operations.

Optimization Strategy: Fused Element-wise Kernel with Vectorization

1. One-Thread-per-Element: Map each element to a CUDA thread.

2. Vectorized Loads (float4): Use `float4` to process 128 bits per memory transaction.

3. Fused In-Register Math:
   - For each element `x`:
     `tanh_val = tanhf(lambda * x)`
     `result = alpha * tanh_val + beta * x`
   - All computations are fused in registers.

4. One-Pass: Fuse all steps into a single read-compute-write kernel.

Here's an example to show you the syntax of inline embedding custom CUDA operators in torch: The example given architecture is:   
  
```python
import torch
import torch.nn as nn

BATCH_SIZE = 4096
HIDDEN_DIM = 4096
SHAPE = (BATCH_SIZE, HIDDEN_DIM)

ALPHA_VAL = 1.0
BETA_VAL = 1.0
LAMBDA_VAL = 1.0

class TanhLU(nn.Module):
    """
    TanhLU Activation.
    https://www.sciencedirect.com/science/article/pii/S0957417422005681?via%3Dihub
    Formula: f(x) = alpha * tanh(lambda * x) + beta * x
    """
    def __init__(self, alpha=1.0, beta=1.0, lambda_p=1.0):
        super(TanhLU, self).__init__()
        self.alpha = alpha
        self.beta = beta
        self.lambda_p = lambda_p

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        return self.alpha * torch.tanh(self.lambda_p * x) + self.beta * x

class Model(nn.Module):
    def __init__(self, alpha=1.0, beta=1.0, lambda_p=1.0):
        super(Model, self).__init__()
        self.act = TanhLU(alpha, beta, lambda_p)
    
    def forward(self, x):
        return self.act(x)

def get_inputs():
    input_tensor = torch.randn(SHAPE, dtype=torch.float32) * 5.0
    return [input_tensor.contiguous()]

def get_init_inputs():
    return [ALPHA_VAL, BETA_VAL, LAMBDA_VAL]